<template>
	<div>
		<el-table
			border
			size="mini"
			:data="tableData"
			style="width: 100%"
			:max-height="tableHeight"
			show-summary
			highlight-current-row
			class="small-size-table"
			:header-cell-style="getRowClass"
			:summary-method="(val) => handleRow(val, subSummary)"
		>
			<el-table-column
				prop="eventId"
				align="center"
				min-width="280"
				:label="$t('funds.order_no')"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					<Copy
						v-if="!!scope.row.eventId"
						:title="scope.row.eventId"
						:copy="copy"
					>
						{{ scope.row.eventId }}
					</Copy>
					<span v-else>-</span>
				</template>
			</el-table-column>
			<el-table-column
				v-if="
					tableColumnData[
						$t('funds.fund_audit.connect_three_order_no')
					]
				"
				prop="thirdOrderNo"
				align="center"
				min-width="300"
				:label="$t('funds.fund_audit.connect_three_order_no')"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					<Copy
						v-if="!!scope.row.thirdOrderNo"
						:title="scope.row.thirdOrderNo"
						:copy="copy"
					>
						{{ scope.row.thirdOrderNo }}
					</Copy>
					<span v-else>-</span>
				</template>
			</el-table-column>
			<el-table-column
				v-if="tableColumnData[$t('funds.deposit_account')]"
				prop="userName"
				align="center"
				:label="$t('funds.deposit_account')"
				min-width="150"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					<Copy
						v-if="!!scope.row.userName"
						:title="scope.row.userName"
						:copy="copy"
					>
						{{ scope.row.userName }}
					</Copy>
					<span v-else>-</span>
				</template>
			</el-table-column>
			<el-table-column
				v-if="tableColumnData[$t('common.number_type')]"
				prop="userName"
				align="center"
				:label="$t('common.number_type')"
				min-width="150"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					{{ (scope.row.userType === 0 ? '会员' : '代理') || '-' }}
				</template>
			</el-table-column>
			<!-- <el-table-column
				v-if="
					tableColumnData[
						$t('funds.proxy_member_funds_record.real_name')
					]
				"
				prop="realName"
				align="center"
				:label="$t('funds.proxy_member_funds_record.real_name')"
				min-width="150"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					<Copy
						v-if="!!scope.row.realName"
						:title="scope.row.realName"
						:copy="copy"
					>
						{{ scope.row.realName }}
					</Copy>
					<span v-else>-</span>
				</template>
			</el-table-column> -->
			<el-table-column
				v-if="tableColumnData[$t('common.belong_merchant')]"
				prop="merchantName"
				align="center"
				:label="$t('common.belong_merchant')"
				min-width="150"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					{{ scope.row.merchantName || '-' }}
				</template>
			</el-table-column>
			<!-- <el-table-column
						prop="vipLevel"
						align="center"
						:label="$t('funds.vip_level')"
						min-width="150"
					>
						<template slot-scope="scope">
							VIP{{ scope.row.vipLevel }}
						</template>
					</el-table-column> -->

			<el-table-column
				v-if="
					tableColumnData[
						$t('funds.proxy_member_funds_record.top_proxy_name')
					]
				"
				prop="appTypeStr"
				align="center"
				:label="$t('funds.proxy_member_funds_record.top_proxy_name')"
				min-width="150"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					{{ scope.row.topProxyName || '-' }}
				</template>
			</el-table-column>
			<el-table-column
				v-if="
					tableColumnData[
						$t('funds.proxy_member_funds_record.parent_proxy_name')
					]
				"
				prop="appTypeStr"
				align="center"
				:label="$t('funds.proxy_member_funds_record.parent_proxy_name')"
				min-width="150"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					{{ scope.row.parentProxyName || '-' }}
				</template>
			</el-table-column>
			<el-table-column
				v-if="
					tableColumnData[
						$t('funds.proxy_member_funds_record.app_type')
					]
				"
				prop="appTypeStr"
				align="center"
				:label="$t('funds.proxy_member_funds_record.app_type')"
				min-width="150"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					{{ scope.row.appTypeStr || '-' }}
				</template>
			</el-table-column>
			<el-table-column
				v-if="
					tableColumnData[
						$t('funds.proxy_member_funds_record.order_status')
					]
				"
				prop="orderStatusStr"
				align="center"
				:label="$t('funds.proxy_member_funds_record.order_status')"
				min-width="150"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					{{ scope.row.orderStatusStr || '-' }}
				</template>
			</el-table-column>
			<el-table-column
				v-if="
					tableColumnData[
						$t('funds.proxy_member_funds_record.client_state')
					]
				"
				prop="clientStatusStr"
				align="center"
				:label="$t('funds.proxy_member_funds_record.client_state')"
				min-width="150"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					{{ scope.row.clientStatusStr || '-' }}
				</template>
			</el-table-column>
			<el-table-column
				v-if="
					tableColumnData[
						$t('funds.proxy_member_funds_record.deposit_ip')
					]
				"
				prop="ip"
				align="center"
				min-width="150"
				show-overflow-tooltip
			>
				<template slot="header">
					{{ $t('funds.proxy_member_funds_record.deposit_ip') }}
					<br />
					{{ $t('funds.wind_control_level') }}
				</template>
				<template slot-scope="scope">
					<span>{{ scope.row.ip }}</span>
					<br />
					<span class="redColor">
						{{ $t('funds.wind_control_level') }}：{{
							scope.row.ipWindControl
						}}
					</span>
				</template>
			</el-table-column>
			<el-table-column
				v-if="
					tableColumnData[
						$t('funds.proxy_member_funds_record.device_no')
					]
				"
				prop="deviceNo"
				align="center"
				min-width="150"
				show-overflow-tooltip
			>
				<template slot="header">
					{{ $t('funds.proxy_member_funds_record.device_no') }}
					<br />
					{{ $t('funds.wind_control_level') }}
				</template>
				<template slot-scope="scope">
					<span>{{ scope.row.deviceNo }}</span>
					<br />
					<span class="redColor">
						{{ $t('funds.wind_control_level') }}：{{
							scope.row.deviceNoWindControl
						}}
					</span>
				</template>
			</el-table-column>
			<el-table-column
				v-if="
					tableColumnData[
						$t(
							'funds.thirdPeymentChannelConfig.payment_merchant_name'
						)
					]
				"
				prop="paymentMerchantName"
				align="center"
				:label="
					$t('funds.thirdPeymentChannelConfig.payment_merchant_name')
				"
				min-width="130"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					{{ scope.row.payMerchantName || '-' }}
				</template>
			</el-table-column>
			<el-table-column
				v-if="tableColumnData[$t('funds.pay_type')]"
				prop="payType"
				align="center"
				:label="$t('funds.pay_type')"
				min-width="130"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					{{ scope.row.payTypeStr || '-' }}
				</template>
			</el-table-column>
			<el-table-column
				v-if="tableColumnData[$t('funds.fund_audit.pay_currency')]"
				prop="currency"
				align="center"
				:label="$t('funds.fund_audit.pay_currency')"
				min-width="130"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					{{ scope.row.currency || '-' }}
				</template>
			</el-table-column>
			<el-table-column
				v-if="tableColumnData[$t('funds.channel_name')]"
				prop="channelName"
				align="center"
				:label="$t('funds.channel_name')"
				min-width="130"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					{{ scope.row.channelName || '-' }}
				</template>
			</el-table-column>
			<!-- <el-table-column
						prop="subPayTypeStr"
						align="center"
						min-width="150"
						:label="$t('funds.proxy_member_funds_record.pay_type')"
					></el-table-column> -->
			<el-table-column
				v-if="
					tableColumnData[
						$t('funds.fund_audit.order_save_money_usdt')
					]
				"
				prop="orderAmountUsdt"
				align="center"
				min-width="200"
				:label="$t('funds.fund_audit.order_save_money_usdt')"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					<span>
						{{
							handleNumber(
								scope.row.symbolUsdt,
								scope.row.orderAmountUsdt
							)
						}}
					</span>
				</template>
			</el-table-column>
			<el-table-column
				v-if="
					tableColumnData[$t('funds.fund_audit.order_save_money_cny')]
				"
				prop="orderAmountCny"
				align="center"
				min-width="200"
				:label="$t('funds.fund_audit.order_save_money_cny')"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					<span>
						{{
							handleNumber(
								scope.row.symbolCny,
								scope.row.orderAmountCny
							)
						}}
					</span>
				</template>
			</el-table-column>
			<!-- <el-table-column
						prop="realAmount"
						align="center"
						min-width="200"
						:label="
							$t('funds.proxy_member_funds_record.real_amount')
						"
						show-overflow-tooltip
					>
						<template slot-scope="scope">
							{{ handleCurrency(scope.row.currency) }}
							{{
								handleNumber(
									scope.row.currency,
									scope.row.realAmount
								)
							}}
						</template>
					</el-table-column> -->
			<el-table-column
				v-if="
					tableColumnData[
						$t('funds.fund_audit.real_record_money_usdt')
					]
				"
				prop="realAmountUsdt"
				align="center"
				min-width="200"
				:label="$t('funds.fund_audit.real_record_money_usdt')"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					<span>
						{{
							handleNumber(
								scope.row.symbolUsdt,
								scope.row.realAmountUsdt
							)
						}}
					</span>
				</template>
			</el-table-column>
			<el-table-column
				v-if="
					tableColumnData[
						$t('funds.fund_audit.real_record_money_cny')
					]
				"
				prop="realAmountCny"
				align="center"
				min-width="200"
				:label="$t('funds.fund_audit.real_record_money_cny')"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					<span>
						{{
							handleNumber(
								scope.row.symbolCny,
								scope.row.realAmountCny
							)
						}}
					</span>
				</template>
			</el-table-column>
			<!-- <el-table-column
						prop="creditLevel"
						align="center"
						min-width="150"
						:label="$t('funds.credit_level')"
						show-overflow-tooltip
					>
						<template slot-scope="scope">
							{{ scope.row.creditLevel }}
						</template>
					</el-table-column> -->
			<el-table-column
				v-if="tableColumnData[$t('funds.apply_time')]"
				prop="eventTime"
				align="center"
				:label="$t('funds.apply_time')"
				min-width="160"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					{{ scope.row.eventTime || '-' }}
				</template>
			</el-table-column>
			<el-table-column
				v-if="
					tableColumnData[
						$t('funds.proxy_member_funds_record.arrive_time')
					]
				"
				prop="payTime"
				align="center"
				:label="$t('funds.proxy_member_funds_record.arrive_time')"
				min-width="160"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					{{ scope.row.payTime || '-' }}
				</template>
			</el-table-column>
			<el-table-column
				v-if="tableColumnData[$t('common.remark')]"
				prop="remark"
				align="center"
				:label="$t('common.remark')"
				min-width="200"
				show-overflow-tooltip
			>
				<template slot-scope="scope">
					{{ scope.row.remark || '-' }}
				</template>
			</el-table-column>
		</el-table>
	</div>
</template>

<script>
import list from '@/mixins/list'
import summaryList from './summaryList1'
export default {
	mixins: [list, summaryList],
	props: {
		tableHeight: {
			type: Number,
			default: 480
		},
		searchLoading: {
			type: Boolean,
			default: false
		},
		tableData: {
			type: Array,
			default: () => {}
		},
		subSummary: {
			type: Object,
			default: () => {}
		},
		totalSummary: {
			type: Object,
			default: () => {}
		},
		allPayoutStatus: {
			type: Array,
			default: () => {}
		},
		activityList: {
			type: Object,
			default: () => {}
		}
	},
	data() {
		return {}
	},
	created() {
		this.initIndexDB('platformDepositRecords', this.activityList)
	}
}
</script>
